import request from '@/utils/request'

// 获取计费规则列表
export function getRuleList(params) {
  return request({
    url: '/parking/rule/list',
    method: 'get',
    params
  })
}

// 添加计费规则
export function addRule(data) {
  return request({
    url: '/parking/rule',
    method: 'post',
    data
  })
}

// 获取计费规则详情
export function getRuleInfo(id) {
  return request({
    url: `/parking/rule/${id}`,
    method: 'get'
  })
}

// 修改计费规则
export function updateRule(data) {
  return request({
    url: '/parking/rule',
    method: 'put',
    data
  })
}

// 删除计费规则
export function deleteRule(id) {
  return request({
    url: `/parking/rule/${id}`,
    method: 'delete'
  })
}
